﻿<?xml version="1.0" encoding="utf-8" ?>
<Recipe xmlns="http://schemas.microsoft.com/pag/gax-core">
  <Arguments>
    <Argument Name="ApplicationNameArgument">
      <ValueProvider Type="Evaluator"
              Expression="$(SolutionArgument.Properties.Item('Name').Value)"
              Stage="OnBeginRecipe">
      </ValueProvider>
    </Argument>
    <Argument Name="VSPackageProjectName">
      <Converter Type="VSSDKAssist.Assets.Converters.ValidFileNameConverter, VSSDKAssist.Assets"/>
      <ValueProvider Type="Evaluator"
                     Expression="$(ApplicationNameArgument)"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="PackageProject" Type="EnvDTE.Project, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Converter Type="ProjectConverter" />
      <ValueProvider
        Type="VSSDKAssist.Assets.ValueProviders.VisualStudio.ProjectByPathExpressionProvider, VSSDKAssist.Assets"
        PathExpression="$(VSPackageProjectName)"
        Stage="OnBeforeActions"/>
    </Argument>
    <Argument Name="ProjectPath" Required="true">
      <ValueProvider Type="VSSDKAssist.Assets.ValueProviders.VisualStudio.ProjectPathValueProvider, VSSDKAssist.Assets"
                     ProjectArgument="PackageProject"
                     Stage="OnBeforeActions"/>
    </Argument>
    <Argument Name="BitmapDestinationFolder" Type="EnvDTE.ProjectItem, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Converter Type="ProjectItemConverter" />
      <ValueProvider
        Type="VSSDKAssist.Assets.ValueProviders.VisualStudio.ProjectItemByNameValueProvider, VSSDKAssist.Assets"
        ProjectArgument="PackageProject"
        ItemName="Resources"
        Stage="OnBeforeActions"/>
    </Argument>
    <Argument Name="ResxProjectItem" Type="EnvDTE.ProjectItem, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
      <Converter Type="ProjectItemConverter" />
      <ValueProvider
        Type="VSSDKAssist.Assets.ValueProviders.VisualStudio.ProjectItemByNameValueProvider, VSSDKAssist.Assets"
        ProjectArgument="PackageProject"
        ItemName="VsPackage.resx"
        Stage="OnBeforeActions"/>
    </Argument>
    <Argument Name="VSPackageCodeClass" Type="EnvDTE.CodeClass, EnvDTE, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Required="true">
      <ValueProvider
        Type="VSSDKAssist.Assets.ValueProviders.VisualStudio.ProjectItemCodeClassValueProvider, VSSDKAssist.Assets"
        ProjectArgument="PackageProject"
        TypeName="VsPackage"
        Stage="OnBeforeActions"/>
    </Argument>
    <Argument Name="PkgCompanyName" Required="true">
      <ValueProvider Type="Evaluator"
                     Expression="My Company"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="PackageName" Required="true">
      <ValueProvider Type="Evaluator"
                     Expression="My Package"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="PackageVersion" Required="true">
      <ValueProvider Type="Evaluator"
                     Expression="1.0"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="VSEdition" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.Common.ValueProviders.DefaultVSEditionValueProvider, VSSDKAssist"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="PlkResourceId" Required="true">
      <ValueProvider Type="VSSDKAssist.Assets.ValueProviders.Framework.RandomNumberValueProvider, VSSDKAssist.Assets"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="BitmapFileName" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.Common.ValueProviders.EmptyIconValueProvider, VSSDKAssist"
                     ImageSize="Size32x32"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="BitmapResourceId" Required="true">
      <ValueProvider Type="VSSDKAssist.Assets.ValueProviders.Framework.RandomNumberValueProvider, VSSDKAssist.Assets"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="PackageProductDetails" Required="true">
      <ValueProvider Type="Evaluator"
                     Expression="My package detailed information"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="ProductNameResourceId" Required="true">
      <ValueProvider Type="VSSDKAssist.Assets.ValueProviders.Framework.RandomNumberValueProvider, VSSDKAssist.Assets"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="ProductDetailsResourceId" Required="true">
      <ValueProvider Type="VSSDKAssist.Assets.ValueProviders.Framework.RandomNumberValueProvider, VSSDKAssist.Assets"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="ProductVersionResourceId" Required="true">
      <ValueProvider Type="VSSDKAssist.Assets.ValueProviders.Framework.RandomNumberValueProvider, VSSDKAssist.Assets"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="PackageGuid" Type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Required="true">
      <ValueProvider Type="VSSDKAssist.Assets.ValueProviders.Framework.GuidValueProvider, VSSDKAssist.Assets"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="DevEnvPath" Required="true">
      <ValueProvider Type="VSSDKAssist.Recipes.Common.ValueProviders.DevEnvPathValueProvider, VSSDKAssist"
                     Stage="OnBeginRecipe"/>
    </Argument>
    <Argument Name="GenerateSplash" Type="System.Boolean" Required="true">
      <ValueProvider Type="Evaluator"
                     Expression="false"
                     Stage="OnBeginRecipe"/>
    </Argument>
  </Arguments>
  <Actions CoordinatorServiceType="VSSDKAssist.Recipes.Common.Coordinators.ConditionalExecutionProgressCoordinator, VSSDKAssist">
    <!-- Add ProvideLoadKey attribute -->
    <Action Name="GenerateProvideLoadKeyAttribute"
            Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library"
            StatusMessage="Creating VS Package project"
            WriteMessageToOutputWindow="true">
      <Input Name="Template" RecipeArgument="ProvideLoadKeyAttributeTT"/>
      <Input Name="PkgCompanyName" RecipeArgument="PkgCompanyName"/>
      <Input Name="PackageName" RecipeArgument="PackageName"/>
      <Input Name="PackageVersion" RecipeArgument="PackageVersion"/>
      <Input Name="VSEdition" RecipeArgument="VSEdition"/>
      <Input Name="PlkResourceId" RecipeArgument="PlkResourceId"/>
      <Output Name="Content" />
    </Action>
    <Action Name="AddProvideLoadKeyAttribute"
            Type="VSSDKAssist.Recipes.Common.Actions.InsertAttributeToCodeClassAction, VSSDKAssist"
            AttributeName="ProvideLoadKey">
      <Input Name="CodeClass" RecipeArgument="VSPackageCodeClass"/>
      <Input Name="AttributeValue" ActionOutput="GenerateProvideLoadKeyAttribute.Content"/>
    </Action>
    
    <!--Add Bitmap File-->
    <Action Name="AddBitmapFile" Type="VSSDKAssist.Assets.Actions.VisualStudio.AddItemFromFileToProjectItemAction, VSSDKAssist.Assets"
            Open="false">
      <Input Name="SourceFileName" RecipeArgument="BitmapFileName"/>
      <Input Name="InputProjectItem" RecipeArgument="BitmapDestinationFolder"/>
      <Output Name="ProjectItem" />
    </Action>
    <!--Udpdate Resx-->
    <Action Name="AddBitmapToResx"
            Type="VSSDKAssist.Recipes.Common.Actions.AddBitmapEntryToResxAction, VSSDKAssist">
      <Input Name="ResxProjectItem" RecipeArgument="ResxProjectItem"/>
      <Input Name="BitmapProjectItem" ActionOutput="AddBitmapFile.ProjectItem"/>
      <Input Name="BitmapResourceId" RecipeArgument="BitmapResourceId"/>
    </Action>
    <Action Name="AddProductNameToResx"
            Type="VSSDKAssist.Recipes.Common.Actions.AddTextEntryToResxAction, VSSDKAssist">
      <Input Name="ResxProjectItem" RecipeArgument="ResxProjectItem"/>
      <Input Name="Text" RecipeArgument="PackageName"/>
      <Input Name="TextResourceId" RecipeArgument="ProductNameResourceId"/>
    </Action>
    <Action Name="AddProductDetailsToResx"
            Type="VSSDKAssist.Recipes.Common.Actions.AddTextEntryToResxAction, VSSDKAssist">
      <Input Name="ResxProjectItem" RecipeArgument="ResxProjectItem"/>
      <Input Name="Text" RecipeArgument="PackageProductDetails"/>
      <Input Name="TextResourceId" RecipeArgument="ProductDetailsResourceId"/>
    </Action>
    <Action Name="AddProductVersionToResx"
            Type="VSSDKAssist.Recipes.Common.Actions.AddTextEntryToResxAction, VSSDKAssist">
      <Input Name="ResxProjectItem" RecipeArgument="ResxProjectItem"/>
      <Input Name="Text" RecipeArgument="PackageVersion"/>
      <Input Name="TextResourceId" RecipeArgument="ProductVersionResourceId"/>
    </Action>
    <!--Add InstalledProductRegistration attribute-->
    <Action Name="GenerateInstalledProductRegistrationAttribute"
      Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library">
      <Input Name="Template" RecipeArgument="InstalledProductRegistrationAttributeTT"/>
      <Input Name="GenerateSplash" RecipeArgument="GenerateSplash"/>
      <Input Name="ProductName" RecipeArgument="PackageName"/>
      <Input Name="ProductNameResourceId" RecipeArgument="ProductNameResourceId"/>
      <Input Name="ProductDetailsResourceId" RecipeArgument="ProductDetailsResourceId"/>
      <Input Name="ProductVersion" RecipeArgument="PackageVersion"/>
      <Input Name="BitmapResourceId" RecipeArgument="BitmapResourceId"/>
      <Output Name="Content" />
    </Action>
    <Action Name="AddInstalledProductRegistrationAttribute"
            Type="VSSDKAssist.Recipes.Common.Actions.InsertAttributeToCodeClassAction, VSSDKAssist"
            AttributeName="InstalledProductRegistration">
      <Input Name="CodeClass" RecipeArgument="VSPackageCodeClass"/>
      <Input Name="AttributeValue" ActionOutput="GenerateInstalledProductRegistrationAttribute.Content"/>
    </Action>
    <!--Create Key.snk-->
    <Action Name="CreateSnk"
          Type="VSSDKAssist.Recipes.Common.Actions.CreateSnkAction, VSSDKAssist">
      <Input Name="Project" RecipeArgument="PackageProject" />
    </Action>
    <!--Create proj.user-->
    <Action Name="GenerateProjUser"
          Type="Microsoft.Practices.RecipeFramework.VisualStudio.Library.Templates.TextTemplateAction, Microsoft.Practices.RecipeFramework.VisualStudio.Library"
          Template="TT\common\CreateSolution\projUser.tt">
      <Input Name="DevEnvPath" RecipeArgument="DevEnvPath"/>
      <Output Name="Content" />
    </Action>
    <Action Name="AddProjUser"
          Type="VSSDKAssist.Assets.Actions.VisualStudio.CreateFileFromStringAction, VSSDKAssist.Assets">
      <Input Name="Content" ActionOutput="GenerateProjUser.Content"/>
      <Input Name="TargetFileName" RecipeArgument="ProjFileName"/>
    </Action>
  </Actions>
</Recipe>